
import {request} from './request'



// 管理中心数据统计 
export const resumeDataCount = (data) => request('/member/resume/progress/dataCount',{data})
// 个人简历导出 - 导出PDF
export const resumeExportPdf = (data) => request('/member/share/resume/exportPdf',{data})
// 城市列表
export const sysAreaModuleList = (data) => request('/sys/sysAreaModule/list',{data})

// 城市列表 
export const universalArea = (data) => request('/sys/platform/setting/universal/area',{data})
// 根据memberId查询会员简历（不传则查询当前登录人）
export const resumeInfo = (data) => request('/member/resume/info')
export const resumeDetail = (data) => request('/member/resume/detail', {
	method: 'get',
	data
})
// 应聘者 - 投递过的职位
export const deliverPage = (data) => request('/member/resume/progress/deliverPage', {
	method: 'post',
	data
})
//应聘者 - 我的面试
export const myInterview = (data) => request('/member/resume/progress/myInterview', {
	method: 'post',
	data
})
// 岗位 - 收藏列表
export const collectPage = (data) => request('/member/resume/collectPage', {
	method: 'post',
	data
})
// 简历分页查询
export const resumePage = (data) => request('/member/resume/page', {
	method: 'post',
	data
})

// 岗位 - 工具栏列表
export const toolbar = (data) => request('/sys/company/job/toolbar', {
	method: 'get',
	data
})
// 岗位 - 新增/编辑
export const jobAddOrEdit = (data) => request('/sys/company/job/addOrEdit', {
	method: 'post',
	data
})
// 发布职位 - 列表
export const jobList = (data) => request('/sys/company/job/list', {
	method: 'get',
	data
})

// 岗位 - 详情
export const jobDetail = (data) => request('/sys/company/job/detail/'+ data.id )


// 岗位 - 开放/关闭
export const postJobStatus = (data) => request('/sys/company/job/status', {
	method: 'post',
	data
})

// 岗位 - 删除
export const postJobDelete = (data) => request('/sys/company/job/delete/'+ data.id, {
	method: 'post',
	data
})


// 企业 - 面试邀约
export const orgInterview = (data) => request('/member/resume/progress/org/interview/invite', {
	method: 'post',
	data
})
// 企业 - 邀约记录
export const orgInvitationRecord = (data) => request('/member/resume/progress/org/interview/list', {
	method: 'get',
	data
})
// 企业 - 收到的简历
export const orgReceiveList = (data) => request('/member/resume/progress/org/receive/list', {
	method: 'get',
	data
})

// 应聘者 - 投递简历
export const deliverJob = (data) => request('/member/resume/progress/deliverJob', {
	method: 'post',
    header: { 'Content-Type': 'application/x-www-form-urlencoded' },
	data
})

// 简历 - 展示设置
export const resumeSetting = (data) => request('/member/resume/setting', {
	method: 'post',
	data
})

// 数字职场-热门城市配置查询
export const jobHotCity = () => request('/sys/area/job/hotCity')
// 数字职场基础职位列表
export const baseListAll = (data) => request('/sys/position/baseListAll',{data})
// 当前会员信息
export const currentMember = () => request('/member/currentMember')


// 简历 - 创建/编辑
export const resumeAddEdit = (data) => {
	const api = data.id ? '/member/resume/update' : '/member/resume/add'
	return request(api, {
			method: 'post',
			data
	})
}
// 简历 - 创建
// export const resumeAdd = () => request('/member/resume/add', {
// 	method: 'post',
// 	data
// })

// 简历 - 编辑
export const resumeUpdate = () => request('/member/resume/update', {
	method: 'post',
	data
})

// 企业 - 收藏/取消收藏简历
export const orgCollect = (data) => request('/member/resume/progress/org/collect', {
	method: 'post',
	data
})

// 企业 - 收藏/取消收藏简历
export const orgCollectList = (data) => request('/member/resume/progress/org/collect/list', {
	method: 'get',
	data
})
// 岗位/公司搜索提示
export const searchHint = (data) => request('/sys/company/job/searchHint', {
	method: 'get',
	data
})
// 根据企业名称查询数字职场相关企业
export const companySearch = (data) => request('/sys/company/job/searchByCompany', {
	method: 'post',
	data
})
// 应聘者 - 搜索（按职位）
export const jobSearch = (data) => request('/sys/company/job/searchByJob', {
	method: 'post',
	data
})
// 岗位 - 其他列表
export const companyJobOther = (data) => request('/sys/company/job/listForUser', {
	method: 'get',
	header: { plat: 4 },
	data
})

// 岗位 - 详情（用户）
export const jobDetailForUser = (data) => request('/sys/company/job/detailForUser/'+ data.id, {
	header: { plat: 4 },
} )


// 企业 - 收藏/取消收藏简历
export const userCollectOrg = (data) => request('/member/resume/collectOrCancel', {
	method: 'post',
	data
})


// 应聘者 - 筛选岗位
export const jobFilter = (data) => request('/sys/company/job/filter', {
	method: 'post',
	header: { plat: 4 },
	data
})

// 岗位 - 沟通数+1
export const jobCommunicate = (data) => request('/sys/company/job/communicate/plus', {
	method: 'post',
    header: { 'Content-Type': 'application/x-www-form-urlencoded' },
	data
})

// 企业列表
export const companyList = (data) => request('/sys/my-company/list', {
	data
})

// 简历 - 综合推荐20条
export const resumeRecommend = (data) => request('/member/resume/recommend', {
	method: 'post',
    // header: { 'Content-Type': 'application/x-www-form-urlencoded' },
	data
})

// 企业信息 - 设置页详情
export const companyDetail = (data) => request('/sys/company/info/auditDetail/'+data.id)

// 企业信息 - 设置页详情
export const companyDetail2 = (data) => request('/sys/company/info/detail/'+data.id, {
	header: { plat: 4 },
})

// 简历 - 音频详情
export const resumeAudioDetail = (data) => request('/member/resume/audio/detail')

// 简历 - 视频详情
export const resumeVideoDetail = (data) => request('/member/resume/video/detail')

// 简历 - 音视频删除
export const resumeAudioVideoDel = (data) => request('/member/resume/del',{
	data
})

// 简历 - 音视频编辑
export const resumeAudioVideoUpdate = (data) => request('/member/resume/video/update',{
	method: 'post',
	data
})

// 简历 - 音视频是否展示
export const resumeAudioVideoShow = (data) => request('/member/resume/video/isShow',{
	method: 'post',
	data
})

// 简历 - ai主播列表
export const resumeAudioAnchorList = (data) => request('/member/resume/anchor')


